body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    overflow: hidden; /* Prevent scrolling */
}

/* 入场动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-scale {
    animation: fadeInScale 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animation-delay-1 {
    animation-delay: 0.1s;
}

.animation-delay-2 {
    animation-delay: 0.2s;
}

.animation-delay-3 {
    animation-delay: 0.3s;
}

.animation-delay-4 {
    animation-delay: 0.4s;
}

.animation-delay-5 {
    animation-delay: 0.5s;
}

.container {
    max-width: 100%;
    height: 100vh;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 20px; /* Add padding at bottom */
}

h1 {
    color: #333;
    margin: 10px 0;
    flex-shrink: 0;
    opacity: 0;
}

.blackboard {
    background-color: #363636; /* 深灰色 */
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    opacity: 0;
}

.seat-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.seat-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.seat-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0; /* Allow column to shrink */
}

.desk-group {
    display: flex;
    flex-direction: row;
    border: 2px solid #cccccc; /* 灰色边框 */
    border-radius: 5px;
    padding: 8px 10px 12px 10px; /* 调整padding使底边位置更合适 */
    background-color: #f0f0f0; /* 灰色背景 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 120px;
    align-items: center; /* 垂直居中对齐 */
}

.desk-group.none {
    background-color: #e0e0e0; /* 更浅的灰色 */
    border-color: #cccccc; /* 灰色边框 */
    opacity: 0.7;
}

.student-name {
    padding: 6px 5px; /* 调整padding使文字上下居中 */
    margin: 0 2px;
    border-radius: 3px;
    background-color: #666666; /* 灰色背景 */
    color: white;
    font-weight: bold;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-name.none {
    background-color: #cccccc; /* 灰色背景 */
    color: #666666; /* 深灰色文字 */
}

/* Sentence display styles */
.sentence-display {
    color: #666666;
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-style: italic;
}

/* Responsive design - maintain fixed columns but adjust for smaller screens */
@media (max-width: 768px) {
    .seat-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
        gap: 15px;
        padding: 0 10px;
        width: calc(100% - 20px);
    }
    
    .desk-group {
        min-width: 100px;
        padding: 8px;
    }
    
    .student-name {
        padding: 3px;
        font-size: 14px;
    }
}

/* Rainbow text effect */
.rainbow-text {
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080, #ff0000);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Large screen optimization for 1920x1080 and above */
@media (min-width: 1920px) {
    .container {
        max-width: 95%;
        padding: 20px 30px;
    }
    
    .seat-container {
        padding: 30px;
        gap: 15px;
    }
    
    .seat-row {
        gap: 15px;
    }
    
    .desk-group {
        min-width: 140px;
        padding: 12px 15px 15px 15px;
    }
    
    .student-name {
        padding: 8px 6px;
        font-size: 18px;
    }
    
    .blackboard {
        font-size: 24px;
        padding: 20px;
    }
    
    h1 {
        font-size: 36px;
        margin: 15px 0;
    }
    
    .date-display {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    /* Larger rainbow text on big screens */
.rainbow-text {
    font-size: 32px;
    margin-top: 25px;
}
}